home *** CD-ROM | disk | FTP | other *** search
- #ifndef _DLG_DLGLST_H
- #define _DLG_DLGLST_H
-
- #ifndef _SIDLG_H
- # include <sidlg.h>
- #endif
- #ifndef _SIMNU_H
- # include <simnu.h>
- #endif
- #ifndef _SISBAR_H
- # include <sisbar.h>
- #endif
-
- typedef struct _dlglst_dat_t /* データ構造体 */
- {
- struct _dlglst_dat_t *next, *prev;
- unsigned int att; /* 属性 */
- unsigned int stt; /* 状態 */
- FRAME_T fr; /* 表示用ワーク */
-
- short xs ,ys; /* 大きさ */
- short xsLm, xsRm; /* 左右マージンドット数 */
- unsigned short ch;
- unsigned short ec;
- FTSDAT_T *fts; /* フォント */
- char *msg; /* メッセージ */
- IMGBLK_T *putptn; /* 表示パターンデータ */
- int (*dspfunc)(); /* ユーザー表示関数 */
- int (*evfunc)(); /* ユーザーイベント関数 */
- int evno;
- void *ptr; /* 汎用ポインタ */
- } DLGLST_DAT_T;
-
- #define DLGLSTDAT_ATT_BTN (0x0000_0001) /* ボタンタイプ */
- #define DLGLSTDAT_ATT_CENTER (0x0001_0000) /* センタリング表示 */
- #define DLGLSTDAT_ATT_MASTER (0x0000_0100) /* マスターデータ */
- #define DLGLSTDAT_ATT_EVMOS (0x0000_0100) /* マウスベンイト */
- #define DLGLSTDAT_ATT_EVKEY (0x0000_0200) /* キーベンイト */
-
- typedef struct _dlglst_lin_t /* 行データ構造体 */
- {
- struct _dlglst_lin_t *next, *prev;
-
- int no; /* 番号 */
- unsigned char mark; /* マーク */
- unsigned char att;
- unsigned short stt;
-
- int numDat; /* データ数 */
- DLGLST_DAT_T *datTop;
- DLGLST_DAT_T *datLast;
- int xs, ys; /* 総ドット数 */
-
- unsigned short ch;
- unsigned short ec;
-
- int (*func)(); /* ユーザー関数 */
- int evno; /* イベント番号 */
- void *ptr; /* 汎用ポインタ */
- } DLGLST_LIN_T;
-
- typedef struct _dlglst_btn_t /* ボタンデータ構造体 */
- {
- struct _dlglst_btn_t *next;
-
- unsigned int att; /* 属性 */
- unsigned int stt; /* 状態 */
- FRAME_T fr; /* 表示用ワーク */
-
- short xs ,ys; /* 大きさ */
- unsigned short ch;
- unsigned short ec;
- FTSDAT_T *fts; /* フォント */
- char *msg; /* メッセージ */
- int (*evfunc)(); /* ユーザーイベント関数 */
- int evno;
- void *ptr; /* 汎用ポインタ */
- } DLGLST_BTN_T;
-
- typedef struct /* カラーテーブル */
- {
- COLOR_T dlgBase;
- COLOR_T dlgHil;
- COLOR_T dlgSha;
-
- COLOR_T ttlBac;
- COLOR_T ttlCha;
- COLOR_T ttlHil;
- COLOR_T ttlSha;
-
- COLOR_T btnBac;
- COLOR_T btnCha;
- COLOR_T btnHil;
- COLOR_T btnSha;
-
- COLOR_T msgCha;
- COLOR_T msgBac;
-
- COLOR_T scnBac;
- COLOR_T scnCha;
- COLOR_T scnHil;
- COLOR_T scnSha;
- COLOR_T scnLin;
- COLOR_T scnCrb; /* カーソル位置 */
- COLOR_T scnCrc;
- COLOR_T scnMkb; /* マーク時 */
- COLOR_T scnMkc;
-
- COLOR_T sboBac; /* スクリーンボタン */
- COLOR_T sboCha; /* 文字 */
- COLOR_T sboHil;
- COLOR_T sboSha;
- COLOR_T sboMkb; /* マーク時バック */
- COLOR_T sboMkc; /* マーク時文字 */
- COLOR_T sboCrb; /* カーソル位置バック */
- COLOR_T sboCrc; /* カーソル位置文字 */
-
- COLOR_T curCha; /* カーソル */
- COLOR_T curBac; /* カールルバック */
-
- COLOR_T clcBac; /* クリック反転色 */
- COLOR_T clcCha; /* クリック反転色 */
- } DLGLST_COL_T;
-
- typedef struct
- {
- unsigned int att;
- unsigned int stt;
-
- EV_T *ev;
-
- struct /* レフトボタン(クローズ) */
- {
- FRAME_T fr;
- int (*func)(DLG_T *); /* クローズチェック関数 */
- } lbtn;
-
- struct /* タイトル */
- {
- FRAME_T fr;
- FTSDAT_T *fts;
- int xs, ys;
- char *msg;
- } ttl;
-
- struct /* メニューバー */
- {
- FRAME_T fr;
- MBAR_T *mbar; /* メニューバー */
- } menu;
-
- struct /* ボタンリスト */
- {
- EV_T *ev; /* イベント */
- int ntmBtn; /* ボタン数 */
- DLGLST_BTN_T *btnTop;
- DLGLST_BTN_T *btnLast;
- } btn;
-
- struct /* メッセージ(上部) */
- {
- FRAME_T fr;
- FTSDAT_T *fts;
- char *msg;
- } tms;
-
- struct /* メッセージ(下部) */
- {
- FRAME_T fr;
- FTSDAT_T *fts;
- char *msg;
- } bms;
-
- struct /* スクリーン */
- {
- EV_T *ev;
- SB_T *sb; /* スクロールバー */
- int xs, ys; /* スクリーンの大きさ */
- int ysLin; /* 1行の縦ドット数 */
- int numDsp; /* 表示可能行数 */
- int ofsDsp; /* 表示オフセット */
- int posCur; /* カーソル */
- FRAME_T fr;
- } scn;
-
- int numLin;
- DLGLST_LIN_T *linTop;
- DLGLST_LIN_T *linLast;
- DLGLST_LIN_T **linTbl;
-
- DLGLST_COL_T col;
- DLG_T *dlg;
- } DLGLST_T;
-
- #define DLGLST_ATT_IGN_RIGHTCLICK_CANCEL (0x0000_0001) /* 右クリッククローズを禁止 */
- #define DLGLST_ATT_IGN_ESCKEY_CANCEL (0x0000_0002) /* [ESC]キーでクローズ禁止 */
- #define DLGLST_ATT_CUROFF (0x0001_0000) /* カーソル禁止 */
- #define DLGLST_ATT_MULTI (0x0002_0000) /* 複数選択モード */
- #define DLGLST_ATT_DEL (0x0004_0000) /* 削除可能 */
- #define DLGLST_ATT_APPEND (0x0008_0000) /* 追加可能 */
- #define DLGLST_ATT_COPY (0x0010_0000) /* 複写可能 */
- #define DLGLST_ATT_SORT (0x0020_0000) /* 並べ替え可能 */
-
- extern DLG_T *DLG_lst_open(void *ptr);
- extern void DLG_lst_close(DLG_T *dlg);
- extern int DLG_lst_setTtl( DLG_T *dlg, FTSDAT_T *fts, CONST char *form, ... );
- extern int DLG_lst_setTopMsg( DLG_T *dlg, FTSDAT_T *fts, CONST char *form, ... );
- extern int DLG_lst_setBottomMsg( DLG_T *dlg, FTSDAT_T *fts, CONST char *form, ... );
- extern int DLG_set_setScnSize( DLG_T *dlg, int xs, int ys, int yslin );
- extern int DLG_lst_setup( DLG_T *dlg );
- extern int DLG_lst_start( DLG_T *dlg );
-
- extern DLGLST_LIN_T *dlgLst_allocLin(int (*func)(), void *ptr);
- extern DLGLST_DAT_T *dlgLst_allocDat(int xs, int ys, CONST char *form, ... );
- extern int dlgLst_linkDat( DLGLST_LIN_T *lin, DLGLST_DAT_T *dat);
- extern int DLG_lst_linkLin( DLG_T *dlg, DLGLST_LIN_T *lin );
- extern int DLG_lst_unlinkLin( DLG_T *dlg, DLGLST_LIN_T *lin );
- extern void DlgLst_freeLinDat( DLGLST_T *dlgLst );
-
- extern int Dlglst_makeLinTbl( DLGLST_T *dlgLst );
-
- #endif
-